package com.goldplusgold.tradedelay.app.base;

import com.goldplusgold.support.lib.manager.wifi.WifiInterface;
import com.goldplusgold.support.lib.manager.wifi.WifiMananger;
import com.goldplusgold.tradedelay.app.application.TDApplication;

/**
 * Created by Administrator on 2017/7/19.
 */

public class TDManager {

    private WifiMananger wifiMananger;
    private static TDManager manager;
    private TDManager(){
    }

    public static TDManager getInstance(){
        if(manager == null){
            synchronized (TDManager.class){
                if(manager == null){
                    manager = new TDManager();
                }
            }
        }
        return manager;
    }

    public WifiMananger getWifiMananger(WifiInterface wifiInterface){
        if (wifiMananger == null){
            wifiMananger = new WifiMananger(TDApplication.getApplication(),wifiInterface);
        }
        wifiMananger.judgeNet();
        return wifiMananger;
    }
}
